//
//  KuKu_Seceen.swift
//  kuku
//
//  Created by 清风徐来 on 2024/1/23.
//

import UIKit

@objc open class KuKu_Seceen: NSObject {

    @objc public class func getStatusBarHeight() -> CGFloat {
        var statusBarHeight: CGFloat = 0.0
        if #available(iOS 11.0, *) {
            statusBarHeight = UIApplication.shared.delegate?.window??.safeAreaInsets.top ?? 0.0
        } else {
            statusBarHeight = UIApplication.shared.statusBarFrame.height
        }
        return statusBarHeight
    }

    @objc public class func getNavigationBarHeight() -> CGFloat {
        let statusBarHeight = getStatusBarHeight()
        return statusBarHeight + 44
    }
    
    @objc public class func getSafeAreaBottom() -> CGFloat {
        let keyWindow = UIApplication.shared.delegate?.window
        return keyWindow??.safeAreaInsets.bottom ?? 0
    }

}
